<?php
/**
 * Created by 陈俊伟.
 * User: Administrator
 * Date: 2019-10-28
 * Time: 下午 2:52
 */

namespace App\Lib\PHPExcel\ManuOrder;

use App\Lib\PHPExcel\ExcelHandle;

class LogisticsStagnation extends ExcelHandle
{
    /*
     * 工厂模式
     * 物流格式定制
     * */
    public function arrange($origin_arr)
    {
        $arr = [
            0 => [
                '订单编号','店铺', '收件人', '电话', '停滞时间周期(天)'
            ]
        ];
        $i = 1;
        foreach ($origin_arr as $data) {
            $arr[$i]['订单编号'] = $data['order_id'];
            $arr[$i]['店铺'] = $data['shop_name'];
            $arr[$i]['收件人'] = $data['post_receiver'];
            $arr[$i]['电话'] = $data['post_tel'];
            $arr[$i]['停滞时间周期(天)'] = $data['timeLast'];


            $i++;
        }

        return $arr;
    }


}